﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using FSS.Core.Util;
using FSS.Core.Controls;
using FSS.BLL.Entities;
using FSS.BLL.Services;

namespace SalesManagement.Modules.Warehouse
{
    public partial class CheckStock : BasePage
    {
        public CheckStock()
            : base(SCREENS.CHECKSTOCK)
        {

        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        [DirectMethod]
        public void DocumentReady()
        {
            //LoadWarehouse();
            //LoadCategory();
        }
        /// <summary>
        /// Load Kho hàng
        /// </summary>
        //private void LoadWarehouse()
        //{
        //    WareHouseEntity warehouseE = new WareHouseEntity();
        //    WareHouseService warehouseS = WareHouseService.GetInstance();
        //    IList<WareHouseEntity> lstWarehouse = warehouseS.LoadAll();
        //    if (null != lstWarehouse)
        //    {
        //        this.storeWarehouse.DataSource = lstWarehouse;
        //        this.storeWarehouse.DataBind();
        //    }
        //}
        //private void LoadCategory()
        //{
        //    CategoryService categoryS = CategoryService.GetInstance();
        //    IList<CategoryEntity> lstCategory = categoryS.LoadAll();
        //    if (null != lstCategory)
        //    {
        //        this.storeCategory.DataSource = lstCategory;
        //        this.storeCategory.DataBind();
        //    }
        //}
        //private void UpdateStock(){
        //    VoucherDetailEntity voucherDetailE = new VoucherDetailEntity();
        //    if (cboWarehouse.Value != null && !"0".Equals(cboWarehouse.Value))
        //        voucherDetailE.WarehouseId = Util.Obj2Int(cboWarehouse.Value);
        //    if (cboCategory.Value != null && !"0".Equals(cboCategory.Value))
        //        voucherDetailE.CategoryId  = Util.Obj2Int(cboCategory.Value);
        //    VoucherDetailService voucherDetailS = VoucherDetailService.GetInstance();
        //    IList<VoucherDetailEntity> lstStock = voucherDetailS.WareHouseCheckStockLoad(voucherDetailE);
        //    storeStockCheck.DataSource = lstStock;
        //    storeStockCheck.DataBind();
        //}
        protected void grStock_OnRefreshData(object sender, StoreRefreshDataEventArgs e)
        {
            //UpdateStock();
        }
        protected void grdMain_OnCommand(object sender, DirectEventArgs e) { }
        public void btnSaveExit_Click(object sender, DirectEventArgs e) { }
        public void btnSave_Click(object sender, DirectEventArgs e) { }
        public void btnExit_Click(object sender, DirectEventArgs e) { }
        public void btnUpdate_Click(object sender, DirectEventArgs e) { }
        public void btnInput_Click(object sender, DirectEventArgs e) { }
    }
}
